<?xml version="1.0"?>
<configuration>
    <property>
        <name>yarn.resourcemanager.principal</name>
        <value>hdfs/_HOST@{{ ansible_domain | upper }}</value>
    </property>

    <property>
        <name>yarn.resourcemanager.address</name>
        <value>0.0.0.0:8032</value>
    </property>

    <property>
        <name>yarn.resourcemanager.scheduler.address</name>
        <value>0.0.0.0:8030</value>
    </property>

    <property>
        <name>yarn.resourcemanager.resource-tracker.address</name>
        <value>0.0.0.0:8031</value>
    </property>

    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>

    <property>
        <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
        <value>org.apache.hadoop.mapred.ShuffleHandler</value>
    </property>

    <property>
        <name>yarn.scheduler.minimum-allocation-mb</name>
        <value>1024</value>
    </property>

    <property>
        <name>yarn.nodemanager.resource.memory-mb</name>
        <value>12288</value>
    </property>

    <property>
        <name>yarn.nodemanager.resource.cpu-vcores</name>
        <value>6</value>
    </property>

    <property>
        <name>yarn.application.classpath</name>
        <value>
            $HADOOP_CONF,
            $HADOOP_ROOT/share/hadoop/common/*,
            $HADOOP_ROOT/share/hadoop/common/lib/*,
            $HADOOP_ROOT/share/hadoop/hdfs/*,
            $HADOOP_ROOT/share/hadoop/hdfs/lib/*,
            $HADOOP_ROOT/share/hadoop/mapreduce/*,
            $HADOOP_ROOT/share/hadoop/mapreduce/lib/*,
            $HADOOP_ROOT/share/hadoop/yarn/*,
            $HADOOP_ROOT/share/hadoop/yarn/lib/*
        </value>
    </property>

    <property>
        <name>yarn.resourcemanager.scheduler.class</name>
        <value>org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler</value>
    </property>

</configuration>
